<!DOCTYPE HTML>
<html>
<head>
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <title>注册享好礼</title>
    <link rel="stylesheet" href="<?php echo $this->staticUrl;?>wx/css/weui.min.css">
    <link rel="stylesheet" href="<?php echo $this->staticUrl;?>wx/css/swiper.min.css">
    <link rel="stylesheet" href="<?php echo $this->staticUrl;?>wx/css/base.css">
    <link rel="stylesheet" href="<?php echo $this->staticUrl;?>wx/css/style.css">
    <script src="<?php echo $this->staticUrl?>wx/js/jquery.min.js"></script>
</head>

<body style="background: #ff6501;">
<img src="<?php echo $img;?>" class="wp100" alt="">
<!-- <a class="kbtn" href="javascript:;" onclick="download();" style="width: 60%; background: #ffe57e; color: #ff6501;margin-top: 20px;">点击前往APP享好礼</a> -->
<a class="kbtn" id="tryOpenApp" href="javascript:;" style="width: 60%; background: #ffe57e; color: #ff6501;margin-top: 20px;">点击前往APP享好礼</a>
<p class="tc cor1 f07 mt10 mb10">手机上的平价菜市 / 1小时配送到家 / 天天特价最低1分钱</p>
<img class="wp100 pb10" src="<?php echo $this->staticUrl;?>wx/img/png/zzz3.png" alt="">
<div class="iostor zezao dn" style="width:100%;height:100%;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.8);z-index:999;"><img class="pos" style="width:120%; right:0;top:20px;" src="<?php echo $this->staticUrl;?>wx/img/png/wechat_ios.png" alt=""></div>
<div class="anzhuotor zezao dn" style="width:100%;height:100%;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.8);z-index:999;"><img class="pos" style="width:120%; right:0;top:20px;" src="<?php echo $this->staticUrl;?>wx/img/png/wechat_andorid.png" alt=""></div>
</body>

<<<<<<< .mine
    var IOS_update = '<?php echo $app_consumer_ios_download_url;?>';
    var Android_update = '<?php echo $app_consumer_android_download_url;?>';
    function download(type) {
        var url;
        if (isAndroid) {
//			var url = (type == 1 ? Android_consumer : Android_merchant )
            if (type == 1){
                url = Android_consumer;
            }else if(type == 2){
                url = Android_merchant;
            }else if(type == 3){
                url = Android_update;
=======
<script>
    // var u = navigator.userAgent;
    // var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
    // var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
    $("#tryOpenApp").click(function(){
        var IOS_consumer = '<?php echo $ios_consumer;?>';
        var Android_consumer = '<?php echo $android_consumer;?>';
        var url_ios =  'tencent1106746054://';//直接打开app
        var url_android = 'gebi://user.com/';//直接打开app
        var ua = window.navigator.userAgent.toLowerCase();

        if (navigator.userAgent.match(/OS\s*(\d+)/)) {
            if (ua.match(/MicroMessenger/i) == 'micromessenger') { 
                $(".iostor").fadeIn(200);
            } else if(ua.match(/QQ/i)=='qq'){ 
                $(".iostor").fadeIn(200);
            } else{
                var loadTime = new Date();
                window.location.href = url_ios;
                setTimeout(function(){
                    var outTime = new Date()
                    if(outTime - loadTime > 800){
                        window.location.href = 'https://itunes.apple.com/us/app/戈壁市集/id1367801016?l=zh&ls=1&mt=8';
                    }
                },1000)
>>>>>>> .r4062
            }
        } else if (navigator.userAgent.match(/Android\s*(\d+)/)) {
            if (ua.match(/MicroMessenger/i) == 'micromessenger') { 
                $(".anzhuotor").fadeIn(200);
            } else if(ua.match(/MQQBrowser/i)=='qq'){
                $(".anzhuotor").fadeIn(200);
            } else{
                window.location = url_android;
                let loadDateTime = Date.now();
                let turn = setTimeout(function(){
                    let timeOutDateTime = Date.now();
                    if ((timeOutDateTime - loadDateTime) < 1000 ){
                        window.location = Android_consumer
                    }
                },600);
                //android
               
            }
        } else { //pc
            $(".iostor").fadeIn(200);
        };
    })

</script>
</html>